Processing a signal by determining the result of a sum-of-products function often is important to the operation of digital signal processors and forms the basis for transforms used in MPEG algorithms and used by various filters. A sum-of-products function generally comprises calculating results of the form: EQU Y=(C.sub.0 *X.sub.0)+(C.sub.1 *X.sub.1)+(C.sub.2 *X.sub.2)
where (C.sub.0,C.sub.1,C.sub.2, . . . ) are constants and (X.sub.0,X.sub.1,X.sub.2, . . . ) are values sampled from a signal being processed. Often, the constants (C.sub.0,C.sub.1,C.sub.2. . . ) are fixed numbers, but sometimes they are allowed to vary.
Determining the result of a sum-of-products function is typically accomplished using a multiply accumulate unit which comprises a multiplier and an adder. In a conventional multiply accumulate unit, the multiplier and adder are used in sequence to compute a product of each term (C.sub.i *X.sub.i)and to add that product to a partial sum such that a new term is added each cycle. The result Y is valid only after all terms have been added, and truncated if necessary. The number of cycles needed for the computation is hence independent of the accuracy required.
In some custom implementations, noting that multiplication can be accomplished using a set of adders, an optimized structure can be obtained by deleting adders associated with zero bits in the coefficients (C.sub.0,C.sub.1,C.sub.2, . . . ). Coefficients (C.sub.0,C.sub.1,C.sub.2, . . . ) can also be chosen to contain a large number of zeroes if the application permits. Many circuits also make use of the fact that subtraction is as efficient as addition and use canonical signed digit representation (CSD) for the constants (C.sub.0,C.sub.1,C.sub.2, . . . ) to reduce the number of adders required in the circuit. This reduction in adders allows a reduction of the size of the circuit.
However, these implementations suffer from the problem that in order to provide a result they need enough cycles to calculate each term (C.sub.i *X.sub.i) irrespective of the needed accuracy of the results.